
function sendPost(url,text1,text2){
    //创建异步对象  
    var xhr = new XMLHttpRequest();
    //设置请求的类型及url
        //post请求一定要添加请求头才行不然会报错
    xhr.open('post',url );
    xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");
        
    //发送请求
    xhr.send('text='+text1+'&time='+text2);
    xhr.onreadystatechange = function () {
    // 这步为判断服务器是否正确响应
    if (xhr.readyState == 4 && xhr.status == 200) {
    console.log(xhr.responseText);
  } 
};
}
function submittt() {
    var text=document.getElementById("demo").value;
    sendPost("https://api.typec.xyz/question",text,getPar("time"));
}
function loggg(tex1t) {
    var text=document.getElementById("demo").value;
    sendPost("https://api.typec.xyz/log",tex1t,getPar("time"));
}
function getPar(par){
    //获取当前URL
    var local_url = document.location.href; 
    //获取要取得的get参数位置
    var get = local_url.indexOf(par +"=");
    if(get == -1){
        return false;   
    }   
    //截取字符串
    var get_par = local_url.slice(par.length + get + 1);    
    //判断截取后的字符串是否还有其他get参数
    var nextPar = get_par.indexOf("&");
    if(nextPar != -1){
        get_par = get_par.slice(0, nextPar);
    }
    return get_par;
}
parcelRequire = function(e, r, t, n) {
    var i, o = "function" == typeof parcelRequire && parcelRequire,
    u = "function" == typeof require && require;
    function f(t, n) {
        if (!r[t]) {
            if (!e[t]) {
                var i = "function" == typeof parcelRequire && parcelRequire;
                if (!n && i) return i(t, !0);
                if (o) return o(t, !0);
                if (u && "string" == typeof t) return u(t);
                var c = new Error("Cannot find module '" + t + "'");
                throw c.code = "MODULE_NOT_FOUND",
                c
            }
            p.resolve = function(r) {
                return e[t][1][r] || r
            },
            p.cache = {};
            var l = r[t] = new f.Module(t);
            e[t][0].call(l.exports, p, l, l.exports, this)
        }
        return r[t].exports;
        function p(e) {
            return f(p.resolve(e))
        }
    }
    f.isParcelRequire = !0,
    f.Module = function(e) {
        this.id = e,
        this.bundle = f,
        this.exports = {}
    },
    f.modules = e,
    f.cache = r,
    f.parent = o,
    f.register = function(r, t) {
        e[r] = [function(e, r) {
            r.exports = t
        },
        {}]
    };
    for (var c = 0; c < t.length; c++) try {
        f(t[c])
    } catch(e) {
        i || (i = e)
    }
    if (t.length) {
        var l = f(t[t.length - 1]);
        "object" == typeof exports && "undefined" != typeof module ? module.exports = l: "function" == typeof define && define.amd ? define(function() {
            return l
        }) : n && (this[n] = l)
    }
    if (parcelRequire = f, i) throw i;
    return f
} ({
    "yHdq": [function(require, module, exports) { !
        function(e, t) {
            function i() {
                var t = r.getBoundingClientRect().width;
                t / d > 1024 && (t = 1024 * d);
                var i = t / 10;
                i = 16 * i / g,
                r.style.fontSize = i + "px",
                s.rem = e.rem = i
            }
            var a, n = e.document,
            r = n.documentElement,
            o = n.querySelector('meta[name="viewport"]'),
            l = n.querySelector('meta[name="flexible"]'),
            d = 0,
            m = 0,
            s = t.flexible || (t.flexible = {});
            if (o) {
                console.warn("将根据已有的meta标签来设置缩放比例");
                var p = o.getAttribute("content").match(/initial\-scale=([\d\.]+)/);
                p && (m = parseFloat(p[1]), d = parseInt(1 / m))
            } else if (l) {
                var c = l.getAttribute("content");
                if (c) {
                    var u = c.match(/initial\-dpr=([\d\.]+)/),
                    f = c.match(/maximum\-dpr=([\d\.]+)/);
                    u && (d = parseFloat(u[1]), m = parseFloat((1 / d).toFixed(2))),
                    f && (d = parseFloat(f[1]), m = parseFloat((1 / d).toFixed(2)))
                }
            }
            if (!d && !m) {
                var v = (e.navigator.appVersion.match(/android/gi), e.navigator.appVersion.match(/iphone/gi)),
                h = e.devicePixelRatio;
                m = 1 / (d = v ? h >= 3 && (!d || d >= 3) ? 3 : h >= 2 && (!d || d >= 2) ? 2 : 1 : 1)
            }
            if (r.setAttribute("data-dpr", d), !o) if ((o = n.createElement("meta")).setAttribute("name", "viewport"), o.setAttribute("content", "initial-scale=" + m + ", maximum-scale=" + m + ", minimum-scale=" + m + ", user-scalable=no"), r.firstElementChild) r.firstElementChild.appendChild(o);
            else {
                var w = n.createElement("div");
                w.appendChild(o),
                n.write(w.innerHTML)
            }
            var y = window.document.createElement("div");
            y.style.width = "0.5rem",
            y.style.display = "none",
            window.document.getElementsByTagName("head")[0].appendChild(y);
            var g = parseFloat(window.getComputedStyle(y, null).getPropertyValue("width"));
            e.addEventListener("resize",
            function() {
                clearTimeout(a),
                a = setTimeout(i, 300)
            },
            !1),
            e.addEventListener("pageshow",
            function(e) {
                clearTimeout(a),
                a = setTimeout(i, 300)
            },
            !1),
            "complete" === n.readyState ? n.body.style.fontSize = 12 * d + "px": n.addEventListener("DOMContentLoaded",
            function(e) {
                n.body.style.fontSize = 12 * d + "px"
            },
            !1),
            i(),
            s.dpr = e.dpr = d,
            s.refreshRem = i,
            s.rem2px = function(e) {
                var t = parseFloat(e) * this.rem;
                return "string" == typeof e && e.match(/rem$/) && (t += "px"),
                t
            },
            s.px2rem = function(e) {
                var t = parseFloat(e) / this.rem;
                return "string" == typeof e && e.match(/px$/) && (t += "rem"),
                t
            }
        } (window, window.lib || (window.lib = {}));
    },
    {}]
},
{},
["yHdq"], null)